package com.hubu.parking.entity.park;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 停车场车位信息表
 * @TableName parking_spot
 */
@TableName(value ="parking_spot")
@Data
public class ParkingSpot implements Serializable {
    /**
     * 车位唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 车位编号（如A-101）
     */
    @TableField(value = "spot_number")
    private String spotNumber;

    /**
     * 状态：可用/已预约/已占用 'available','reserved','parked'
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 物理位置描述
     */
    @TableField(value = "location")
    private String location;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 最后更新时间
     */
    @TableField(value = "updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}